package org.lt.resume.dao.subcompanydao;

import org.lt.resume.dao.subcompanydaoInterface.SubcompanyInterface;
import org.lt.resume.domain.company.SubCompanyInfo;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

public class SubCompanyDAO extends HibernateDaoSupport implements SubcompanyInterface{

	public void addSubcompany(SubCompanyInfo subcompany){
		this.getHibernateTemplate().save(subcompany);
	}

	public void updateSubcompany(SubCompanyInfo subcompany){
	    this.getHibernateTemplate().update(subcompany);
	}

	public void findUser(String subcompanyName){
	    this.getHibernateTemplate().find("From SubCompanyInfo s where s.name like %"+subcompanyName+"%");
	}

	public void deleteUser(SubCompanyInfo subcompany){
		this.getHibernateTemplate().delete(subcompany);
	}
	
}
